package com.whcoding.designpatterns.pattern.builder;

/**
 * @program: spring-boot-learning
 * @description:
 * @author: whcoding
 * @create: 2022-09-20 17:34
 **/
public class BuilderTests {

	public static void main(String[] args) {

		// 盖普通房子
		CommonHouse commonHouse = new CommonHouse();
		// 准备创建房子的指挥者
		HouseDirector houseDirector = new HouseDirector(commonHouse);
		// 完成盖房子
		houseDirector.constructHouse();

		// 盖高楼
		houseDirector.setHouseBuilder(new HighBuilding());
		// 完成盖房子
		houseDirector.constructHouse();
	}
}
